package com.tiancheng.trade.order.enums;

import com.tiancheng.trade.commom.core.enums.BaseEnum;
import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @Author: likailun
 * @Description:
 * @Date: create in 2021/9/1 4:24 下午
 */
@Getter
@AllArgsConstructor
public enum QrSourceEnum implements BaseEnum<Integer> {
    TRANSIT(1,"公交");


    private Integer code;
    private String desc;

    public static String getDesc(Integer code) {
        QrSourceEnum[] businessModeEnums = values();
        for (QrSourceEnum statusEnum : businessModeEnums) {
            if (statusEnum.code().equals(code)) {
                return statusEnum.desc();
            }
        }
        return null;
    }


    public Integer code() {
        return this.code;
    }

    public String desc() {
        return this.desc;
    }
}
